package com.ruoyi.demo.domain.dao;

import com.baomidou.mybatisplus.annotation.*;
import com.eic.framework.core.annotation.InsertTime;
import com.eic.framework.core.annotation.InsertUser;
import com.eic.framework.core.annotation.UpdateTime;
import com.eic.framework.core.annotation.UpdateUser;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.util.Date;

/**
 * 人员对象 demo_user
 *
 * @author 尹国春
 * @date 2022-02-25
 */
@ApiModel("人员对象")
@TableName("demo_user")
public class DemoUser implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 用户id */
    @ApiModelProperty(value = "用户id")
    @TableId(value = "user_id",type = IdType.ASSIGN_ID)
    private String userId;

    /** 部门id */
    @ApiModelProperty(value = "部门id")
    @TableField("dept_id")
    private String deptId;

    /** 用户姓名 */
    @ApiModelProperty(value = "用户姓名")
    @Excel(name = "用户姓名")
    @TableField("user_name")
    private String userName;

    /** 用户状态[0=正常,1=停用]sys_normal_disable */
    @ApiModelProperty(value = "用户状态[0=正常,1=停用]sys_normal_disable")
    @TableField("state")
    private String state;

    /** 创建时间 */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    @InsertTime
    private Date createTime;

    /** 创建人 */
    @ApiModelProperty(value = "创建人")
    @TableField("create_by")
    @InsertUser
    private String createBy;

    /** 更新时间 */
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("update_time")
    @UpdateTime
    private Date updateTime;

    /** 更新人 */
    @ApiModelProperty(value = "更新人")
    @TableField("update_by")
    @UpdateUser
    private String updateBy;

    /** 删除标志 */
    @ApiModelProperty(value = "删除标志")
    @TableField("del_flag")
    @JsonIgnore
    @TableLogic
    private Long delFlag;

    public DemoUser setUserId(String userId)
    {
        this.userId = userId;
        return this;
    }

    public String getUserId()
    {
        return userId;
    }
    public DemoUser setDeptId(String deptId)
    {
        this.deptId = deptId;
        return this;
    }

    public String getDeptId()
    {
        return deptId;
    }
    public DemoUser setUserName(String userName)
    {
        this.userName = userName;
        return this;
    }

    public String getUserName()
    {
        return userName;
    }
    public DemoUser setState(String state)
    {
        this.state = state;
        return this;
    }

    public String getState()
    {
        return state;
    }
    public DemoUser setCreateTime(Date createTime)
    {
        this.createTime = createTime;
        return this;
    }

    public Date getCreateTime()
    {
        return createTime;
    }
    public DemoUser setCreateBy(String createBy)
    {
        this.createBy = createBy;
        return this;
    }

    public String getCreateBy()
    {
        return createBy;
    }
    public DemoUser setUpdateTime(Date updateTime)
    {
        this.updateTime = updateTime;
        return this;
    }

    public Date getUpdateTime()
    {
        return updateTime;
    }
    public DemoUser setUpdateBy(String updateBy)
    {
        this.updateBy = updateBy;
        return this;
    }

    public String getUpdateBy()
    {
        return updateBy;
    }
    public DemoUser setDelFlag(Long delFlag)
    {
        this.delFlag = delFlag;
        return this;
    }

    public Long getDelFlag()
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.SHORT_PREFIX_STYLE)
                .append("userId", getUserId())
                .append("deptId", getDeptId())
                .append("userName", getUserName())
                .append("state", getState())
                .append("createTime", getCreateTime())
                .append("createBy", getCreateBy())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .append("delFlag", getDelFlag())
                .toString();
    }
}
